<html>  
  <head>  
        <meta charset="utf-8">  
        <title>6.1.2 HSL颜色</title>  
  </head> 
  <style>

  </style>
<body>

<script src="../../d3/d3.min.js" charset="utf-8"></script> 
<script>  


var hsl = d3.hsl(120,1.0,0.5);

//返回的对象中，h:120, s:1.0, l:0.714
console.log( hsl.brighter() );

//返回的对象中，h:120, s:1.0, l:0.35
console.log( hsl.darker() );

//返回的对象中，r:0, g:255, b:0
console.log( hsl.rgb() );

//输出#00ff00
console.log( hsl.toString() );

</script> 

</body>
</html>